package cn.edu.scau.cmi.mengzhuorong.client;

import cn.edu.scau.cmi.mengzhuorong.factory.*;
import java.util.Scanner;
import java.lang.Runnable;

public class FactoryClient implements Runnable {

	public static void main(String[] args) {
		MeatFactory meatfactory;
		Scanner reader = new Scanner(System.in);
		System.out.println("请输入“Pork”，“Beef”，“Chicken”任一单词");
		String string = reader.next();
		switch(string) {
		case"Pork":
			meatfactory = new PorkMeatFactory();
			meatfactory.getMeat().cook();
			break;
		case"Beef":
			meatfactory = new BeefMeatFactory();
			meatfactory.getMeat().cook();
			break;
		case"Chicken":
			meatfactory = new ChickenMeatFactory();
			meatfactory.getMeat().cook();
			break;
			default:
				System.out.println("The imput is wrong!");
		}
		reader.close();
	}
	
	@Override
	public void run() {
		this.main(null);
	}
}
